import 'package:flutter_test/flutter_test.dart';
import '../../lib/common/data/emotion.dart';

void main() {
  group('Emotion Data Tests', () {
    test('should have emotion data', () {
      expect(emotions.isNotEmpty, true);
      expect(emotions.length, 5);
    });

    test('should have correct emotion properties', () {
      final firstEmotion = emotions.first;
      expect(firstEmotion.id, isNotEmpty);
      expect(firstEmotion.name, isNotEmpty);
      expect(firstEmotion.image, isNotEmpty);
      expect(firstEmotion.image, contains('assets/image/emotions/'));
      expect(firstEmotion.image, endsWith('.gif'));
    });

    test('should get emotion by name', () {
      final happyEmotion = getEmotionByName('happy');
      expect(happyEmotion.name, 'happy');
      expect(happyEmotion.id, '1');
      expect(happyEmotion.image, 'assets/image/emotions/happy.gif');
    });

    test('should have all expected emotions', () {
      final emotionNames = emotions.map((e) => e.name).toList();
      expect(emotionNames, contains('happy'));
      expect(emotionNames, contains('angry'));
      expect(emotionNames, contains('love'));
      expect(emotionNames, contains('disappointed'));
      expect(emotionNames, contains('bored'));
    });
  });
}
